// import { sleep } from 'demos'

export const demoSrc =
  'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fda3d74f4-7d5c-440a-a99d-e6a00db06e68%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1735298975&t=479de35915d4be32de7d5adb680d08c8'

export async function mockUpload(file: File) {
//   await sleep(3000)
  return {
    url: URL.createObjectURL(file),
  }
}

export async function mockUploadFail() {
//   await sleep(3000)
  throw new Error('Fail to upload')
}